package com.example.it.recycleviewpager;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;

import java.util.List;

/**
 * Created by 鲁迅认识的那只猹 on 9/25/2017 11:10 AM.
 * Emial 1258730808@qq.com
 * Desc:
 */

public class AdvertisingAdapter extends BaseRecycleViewPagerAdapter<Integer> {

    public AdvertisingAdapter(Context context, List<Integer> dataSource) {
        super(context, dataSource);
    }

    /**
     * 建立我们需要用来轮播的图片
     */
    @Override
    View bindingView(int postion) {
        ImageView imageView = new ImageView(getContext());
        imageView.setLayoutParams(new ViewGroup.LayoutParams(-1, -1));
        imageView.setImageResource(getDataSource().get(postion));
        return imageView;
    }
}
